package com.backend.config.oss;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Data
@Component
@ConfigurationProperties(prefix = "aliyun.oss")
public class OssProperties {
    
    private String endpoint;
    private String accessKeyId;
    private String accessKeySecret;
    private String bucketName;
    private String roleArn; // 角色ARN
    private Long durationSeconds = 3600L; // 临时凭证有效期，默认1小时
    private String region; // 地域，如 oss-cn-hangzhou
    private String uploadDir = "upload/"; // 上传目录
} 